<%@ page contentType="text/html;charset=UTF-8" trimDirectiveWhitespaces="true" %>
<%@ include file="../common/taglibs.jsp"%>

			<c:if test="${not empty orderList}">
				<thead>
                      <tr>
                            <th width="9%">订单编号</th>
                            <th width="5%">卖家名称</th>
                            <th width="5%">买家名称</th>
                            <th width="5%">订单状态</th>
                            <th width="6%">商品标题</th>
                            <th width="6%">商品描述</th>
                            <th width="4%">商品图片</th>
                            <th width="4%">商品数量</th>
                            <th width="7%">创建时间</th>
                            <th width="7%">操作</th>
                       </tr>
                  </thead>
                       <tbody>
                       	 <c:forEach items="${orderList}" var="order" varStatus="index">
							<tr <c:if test="${(index.index+1)%2==0}">class="gradeX"</c:if>>
                                    <td style="overflow:hidden;text-overflow:ellipsis;"><span data-toggle="tooltip" data-placement="right" title="${order.disburseNo }"><nobr>${order.disburseNo }</nobr></span></td>
                                    <td style="overflow:hidden;text-overflow:ellipsis;"><span data-toggle="tooltip" data-placement="right" title="${order.sellerMemberName }"><nobr>${order.sellerMemberName }</nobr></span></td>
                                    <td style="overflow:hidden;text-overflow:ellipsis;"><span data-toggle="tooltip" data-placement="right" title="${order.buyerMemberName }"><nobr>${order.buyerMemberName }</nobr></span></td>
                                    <td style="overflow:hidden;text-overflow:ellipsis;"><span data-toggle="tooltip" data-placement="right" title="${order.statusName }"><nobr>${order.statusName }</nobr></span></td>
                                    <td style="overflow:hidden;text-overflow:ellipsis;"><span data-toggle="tooltip" data-placement="right" title="${order.snapshot.title }"><nobr>${order.snapshot.title }</nobr></span></td>
                                    <td style="overflow:hidden;text-overflow:ellipsis;"><span data-toggle="tooltip" data-placement="right" title="${order.snapshot.itemDesc }"><nobr>${order.snapshot.itemDesc }</nobr></span></td>
                                    <td><a href="${order.snapshot.pic}" target="_blank"><img src="${order.snapshot.pic}" width="60" height="60"></a></td>
                                    <td style="overflow:hidden;text-overflow:ellipsis;">
                                    <span data-toggle="tooltip" data-placement="right"><nobr>
                                        <c:forEach items="${order.skus}" var="sku" varStatus="status">
											${sku.skuName}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${sku.stock}<br>
										</c:forEach>
                                    </nobr></span>
	                                    
                                    </td>
                                    <td>${order.timeAddStr}</td>
                                    <td>
                                        <a href="javascript:;detailDisburse('${order.disburseNo }');"><span style="font-weight:600;font-family:inherit;color:inherit;">详情</span></a>&nbsp;
                                        <c:choose>
						                	<c:when test="${9 == order.status}">
						                        <a href="javascript:;cancelReadyGoods('${order.disburseNo }', '10');"><span style="font-weight:600;font-family:inherit;color:inherit;">取消备货</span></a>&nbsp;
						                    </c:when>
						                	<c:otherwise>
						                		<a href="javascript:;readyGoods('${order.disburseNo }', '9');"><span style="font-weight:600;font-family:inherit;color:inherit;">备货</span></a>&nbsp;
   											</c:otherwise>
						                </c:choose>
                                        
                                        <a href="javascript:;updateDisburse('${order.disburseNo }', '5');"><span style="font-weight:600;font-family:inherit;color:inherit;">发货</span></a>&nbsp;
                                        
                                        <c:choose>
						                	<c:when test="${sessionScope.member.memberName.equals('admin') and order.status == 4}">
						                        <a href="javascript:;cancelManager('${order.disburseNo }', '11');"><span style="font-weight:600;font-family:inherit;color:inherit;">取消 </span></a>&nbsp;
						                    </c:when>
						                </c:choose>
                                        
                                    </td>
                           </tr>
						 </c:forEach>
						 <script type="text/javascript">
						 	var startResult = eval("${startResult}");
						 	var endResult = eval("${endResult}");
						 	var totalCounts = eval("${page.totalCounts}");
						 	var totalPages = eval("${page.totalPages}");
						 	var pageNum = eval("${page.pageNum}");
						 </script>
                       </tbody>
                       </c:if>